package com.jic.market.api.after;

import com.jic.common.base.vo.RestResult;
import com.jic.market.request.after.TellAddAllocationRequest;
import com.jic.market.response.after.TellAddAllocationResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author xuyongliang
 * @version V1.0
 * @className AllocationApi
 * @description
 * @date 2020/3/15
 * feignClient  使用方法:
 * 1.服务提供者编写 FeignClient 属性 name对应注册中心服务Id path为统一前缀  url可以直接指定调用地址（调试用）
 * 2.客户端需要在启动类上加上@EnableFeignClients注解
 * 3.如果通过feignClient调用超时，请设置
 * ribbon:
 *   ReadTimeout: 3000
 *   ConnectTimeout: 3000
 * 4.客户端依赖该jic-feign-common,在调用处@Resource注解注入 即可调用
 *
 */

@FeignClient(name = "jic-market",path = "/api/allocation")
public interface AllocationApi {

    @PostMapping("/tell")
    RestResult<TellAddAllocationResponse> tellAddAllocation(TellAddAllocationRequest request);
}
